﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace POSGui.Classes.BusinessLogic
{
    public class UserManager
    {
        #region Singleton
        private static UserManager _instance;

        private UserManager()
        {
        }

        public static UserManager GetInstance()
        {
            if (_instance == null)
            {
                _instance = new UserManager();
            }
            return _instance;
        }
        #endregion

        #region Public Methods

        public WebServiceAgent LogIn(string username, string password, string branch)
        {
            WebServiceAgent webServiceConnection = new WebServiceAgent();
            bool authSuccess = webServiceConnection.LogInSalesman(username, password, branch);
            return authSuccess ? webServiceConnection : null;
        }

        #endregion
    }
}